<%@page import="java.io.File"%>
<jsp:useBean id="pageConfig" scope="session" class="bean.Page"></jsp:useBean>
<jsp:useBean id="pageCGI" scope="session" class="bean.Page"></jsp:useBean>
<% 
int id = pageConfig.getAction_id(); 
int idp = pageConfig.getPatient_id();
String path = "patients/"+idp+"/ordonnances/ordonnance"+id+".pdf";
System.out.println(path);
File f = new File(request.getRealPath("/")+path);
if (f.exists()) {
%>
<script type="text/javascript">
document.location.href = "<%=path %>";
</script>
<% }
else {
	out.print("<h1>Ressource indisponible</h1><p>L'ordonnance demand&eacute;e n'est actuellement pas disponible.<p>");
}%>